package com.kexinde.wjifen.model;

import java.util.Date;

import javax.persistence.Entity;

import java.sql.Timestamp;

/**
 * 商店
 * 
 * @author WEI
 *
 */
@Entity
public class Shop {

	/**
	 * 主键
	 */
	private Long id;
	
	/**
	 * 店铺名
	 */
	private String name = "";
	
	/**
	 * 邮箱
	 */
	private String email= "";
	
	/**
	 * 联系电话
	 */
	private String telNum = "";
	
	/**
	 * 商标图片路径
	 */
	private String logo = "";
	
	/**
	 * 注册金额
	 */
	private String profile = "";
	
	/**
	 * 店铺地址
	 */
	private Long addressId = 0L;
	
	/**
	 * 注册资金
	 */
	private Double regMoney = 0.0;
	
	/**
	 * 创建时间
	 */
	private Date insTime = new Date();

	/**
	 * 商店服务描述
	 */
	private String service = "";
	
	/**
	 * 商店氛围描述
	 */
	private String atmosphere = "";
	
	/**
	 * 商店特色描述
	 */
	private String character = "";
	
	/**
	 * 商店营业时间
	 */
	private String businessHour = "";
	
	/**
	 * 商店公交路线描述
	 */
	private String busInfo = "";
	
	/**
	 * 商店百度地图代码<iframe>
	 */
	private String map = "";
	
	/**
	 * 商店味道评分 
	 */
	private Double tasteRank = 0.0;
	
	/**
	 * 商店环境评分 
	 */
	private Double environmentRank = 0.0;
	
	/**
	 * 商店服务评分 
	 */
	private Double serviceRank = 0.0;
	
	/**
	 *商家主页的被访问次数 
	 */
	private Long visitTimes = 0L;

	/**
	 * 构造方法
	 * 动态创建实例，用于数据库读写时，反射获取对象
	 * 
	 * @param id
	 * @param name
	 * @param email
	 * @param telNum
	 * @param logo
	 * @param profile
	 * @param addressId
	 * @param regMoney
	 * @param insTime
	 * @param service
	 * @param atmosphere
	 * @param character
	 * @param businessHour
	 * @param busInfo
	 * @param map
	 * @param tasteRank
	 * @param environmentRank
	 * @param serviceRank
	 */
	public Shop(Long id, String name, String email, String telNum, String logo,
			String profile, Long addressId, Double regMoney, Timestamp insTime,
			String service, String atmosphere, String character,
			String businessHour, String busInfo, String map, Double tasteRank,
			Double environmentRank, Double serviceRank) {
		super();
		this.id = id;
		this.name = name;
		this.email = email;
		this.telNum = telNum;
		this.logo = logo;
		this.profile = profile;
		this.addressId = addressId;
		this.regMoney = regMoney;
		this.insTime = insTime;
		this.service = service;
		this.atmosphere = atmosphere;
		this.character = character;
		this.businessHour = businessHour;
		this.busInfo = busInfo;
		this.map = map;
		this.tasteRank = tasteRank;
		this.environmentRank = environmentRank;
		this.serviceRank = serviceRank;
	}
	
	
	/**
	 * 构造函数
	 * 动态创建实例，用于查询首页热门商家，最新商家
	 * @param id
	 * @param name
	 * @param logo
	 * @param profile
	 */
	public Shop(Long id, String name, String logo, String profile) {
		super();
		this.id = id;
		this.name = name;
		this.logo = logo;
		this.profile = profile;
	}



	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String getTelNum() {
		return telNum;
	}

	public void setTelNum(String telNum) {
		this.telNum = telNum;
	}

	public String getLogo() {
		return logo;
	}

	public void setLogo(String logo) {
		this.logo = logo;
	}

	public String getProfile() {
		return profile;
	}

	public void setProfile(String profile) {
		this.profile = profile;
	}

	public Long getAddressId() {
		return addressId;
	}

	public void setAddressId(Long addressId) {
		this.addressId = addressId;
	}

	public Double getRegMoney() {
		return regMoney;
	}

	public void setRegMoney(Double regMoney) {
		this.regMoney = regMoney;
	}

	public Date getInsTime() {
		return insTime;
	}

	public void setInsTime(Date insTime) {
		this.insTime = insTime;
	}

	public String getService() {
		return service;
	}

	public void setService(String service) {
		this.service = service;
	}

	public String getAtmosphere() {
		return atmosphere;
	}

	public void setAtmosphere(String atmosphere) {
		this.atmosphere = atmosphere;
	}

	public String getCharacter() {
		return character;
	}

	public void setCharacter(String character) {
		this.character = character;
	}

	public String getBusinessHour() {
		return businessHour;
	}

	public void setBusinessHour(String businessHour) {
		this.businessHour = businessHour;
	}

	public String getBusInfo() {
		return busInfo;
	}

	public void setBusInfo(String busInfo) {
		this.busInfo = busInfo;
	}

	public String getMap() {
		return map;
	}

	public void setMap(String map) {
		this.map = map;
	}

	public Double getTasteRank() {
		return tasteRank;
	}

	public void setTasteRank(Double tasteRank) {
		this.tasteRank = tasteRank;
	}

	public Double getEnvironmentRank() {
		return environmentRank;
	}

	public void setEnvironmentRank(Double environmentRank) {
		this.environmentRank = environmentRank;
	}

	public Double getServiceRank() {
		return serviceRank;
	}

	public void setServiceRank(Double serviceRank) {
		this.serviceRank = serviceRank;
	}

	/**
	 * 用于测试
	 */
	@Override
	public String toString() {
		return "Shop [id=" + id + ", name=" + name + ", email=" + email
				+ ", telNum=" + telNum + ", logo=" + logo + ", profile="
				+ profile + ", addressId=" + addressId + ", regMoney="
				+ regMoney + ", insTime=" + insTime + ", service=" + service
				+ ", atmosphere=" + atmosphere + ", character=" + character
				+ ", businessHour=" + businessHour + ", busInfo=" + busInfo
				+ ", map=" + map + ", tasteRank=" + tasteRank
				+ ", environmentRank=" + environmentRank + ", serviceRank="
				+ serviceRank + "]";
	}
	
}
